// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::ManagedSchemaRegistry].
#[async_trait::async_trait]
pub trait ManagedSchemaRegistry: std::fmt::Debug + Send + Sync {
    async fn get_schema_registry(
        &self,
        req: crate::model::GetSchemaRegistryRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaRegistry>>;

    async fn list_schema_registries(
        &self,
        req: crate::model::ListSchemaRegistriesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListSchemaRegistriesResponse>>;

    async fn create_schema_registry(
        &self,
        req: crate::model::CreateSchemaRegistryRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaRegistry>>;

    async fn delete_schema_registry(
        &self,
        req: crate::model::DeleteSchemaRegistryRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn get_context(
        &self,
        req: crate::model::GetContextRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Context>>;

    async fn list_contexts(
        &self,
        req: crate::model::ListContextsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn get_schema(
        &self,
        req: crate::model::GetSchemaRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Schema>>;

    async fn get_raw_schema(
        &self,
        req: crate::model::GetSchemaRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn list_schema_versions(
        &self,
        req: crate::model::ListSchemaVersionsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn list_schema_types(
        &self,
        req: crate::model::ListSchemaTypesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn list_subjects(
        &self,
        req: crate::model::ListSubjectsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn list_subjects_by_schema_id(
        &self,
        req: crate::model::ListSubjectsBySchemaIdRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn delete_subject(
        &self,
        req: crate::model::DeleteSubjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn lookup_version(
        &self,
        req: crate::model::LookupVersionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaVersion>>;

    async fn get_version(
        &self,
        req: crate::model::GetVersionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaVersion>>;

    async fn get_raw_schema_version(
        &self,
        req: crate::model::GetVersionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn list_versions(
        &self,
        req: crate::model::ListVersionsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn create_version(
        &self,
        req: crate::model::CreateVersionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CreateVersionResponse>>;

    async fn delete_version(
        &self,
        req: crate::model::DeleteVersionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn list_referenced_schemas(
        &self,
        req: crate::model::ListReferencedSchemasRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>>;

    async fn check_compatibility(
        &self,
        req: crate::model::CheckCompatibilityRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CheckCompatibilityResponse>>;

    async fn get_schema_config(
        &self,
        req: crate::model::GetSchemaConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaConfig>>;

    async fn update_schema_config(
        &self,
        req: crate::model::UpdateSchemaConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaConfig>>;

    async fn delete_schema_config(
        &self,
        req: crate::model::DeleteSchemaConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaConfig>>;

    async fn get_schema_mode(
        &self,
        req: crate::model::GetSchemaModeRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaMode>>;

    async fn update_schema_mode(
        &self,
        req: crate::model::UpdateSchemaModeRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaMode>>;

    async fn delete_schema_mode(
        &self,
        req: crate::model::DeleteSchemaModeRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaMode>>;

    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::ListLocationsResponse>>;

    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::Location>>;

    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>;

    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>>;

    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;

    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>>;
}

/// All implementations of [super::ManagedSchemaRegistry] also implement [ManagedSchemaRegistry].
#[async_trait::async_trait]
impl<T: super::ManagedSchemaRegistry> ManagedSchemaRegistry for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn get_schema_registry(
        &self,
        req: crate::model::GetSchemaRegistryRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaRegistry>> {
        T::get_schema_registry(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_schema_registries(
        &self,
        req: crate::model::ListSchemaRegistriesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::ListSchemaRegistriesResponse>> {
        T::list_schema_registries(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_schema_registry(
        &self,
        req: crate::model::CreateSchemaRegistryRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaRegistry>> {
        T::create_schema_registry(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_schema_registry(
        &self,
        req: crate::model::DeleteSchemaRegistryRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_schema_registry(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_context(
        &self,
        req: crate::model::GetContextRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Context>> {
        T::get_context(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_contexts(
        &self,
        req: crate::model::ListContextsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::list_contexts(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_schema(
        &self,
        req: crate::model::GetSchemaRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::Schema>> {
        T::get_schema(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_raw_schema(
        &self,
        req: crate::model::GetSchemaRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::get_raw_schema(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_schema_versions(
        &self,
        req: crate::model::ListSchemaVersionsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::list_schema_versions(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_schema_types(
        &self,
        req: crate::model::ListSchemaTypesRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::list_schema_types(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_subjects(
        &self,
        req: crate::model::ListSubjectsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::list_subjects(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_subjects_by_schema_id(
        &self,
        req: crate::model::ListSubjectsBySchemaIdRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::list_subjects_by_schema_id(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_subject(
        &self,
        req: crate::model::DeleteSubjectRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::delete_subject(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn lookup_version(
        &self,
        req: crate::model::LookupVersionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaVersion>> {
        T::lookup_version(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_version(
        &self,
        req: crate::model::GetVersionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaVersion>> {
        T::get_version(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_raw_schema_version(
        &self,
        req: crate::model::GetVersionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::get_raw_schema_version(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_versions(
        &self,
        req: crate::model::ListVersionsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::list_versions(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_version(
        &self,
        req: crate::model::CreateVersionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CreateVersionResponse>> {
        T::create_version(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_version(
        &self,
        req: crate::model::DeleteVersionRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::delete_version(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_referenced_schemas(
        &self,
        req: crate::model::ListReferencedSchemasRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<api::model::HttpBody>> {
        T::list_referenced_schemas(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn check_compatibility(
        &self,
        req: crate::model::CheckCompatibilityRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::CheckCompatibilityResponse>> {
        T::check_compatibility(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_schema_config(
        &self,
        req: crate::model::GetSchemaConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaConfig>> {
        T::get_schema_config(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_schema_config(
        &self,
        req: crate::model::UpdateSchemaConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaConfig>> {
        T::update_schema_config(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_schema_config(
        &self,
        req: crate::model::DeleteSchemaConfigRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaConfig>> {
        T::delete_schema_config(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_schema_mode(
        &self,
        req: crate::model::GetSchemaModeRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaMode>> {
        T::get_schema_mode(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_schema_mode(
        &self,
        req: crate::model::UpdateSchemaModeRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaMode>> {
        T::update_schema_mode(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_schema_mode(
        &self,
        req: crate::model::DeleteSchemaModeRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<crate::model::SchemaMode>> {
        T::delete_schema_mode(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::ListLocationsResponse>> {
        T::list_locations(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<location::model::Location>> {
        T::get_location(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        T::list_operations(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<longrunning::model::Operation>> {
        T::get_operation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::delete_operation(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> crate::Result<gax::response::Response<()>> {
        T::cancel_operation(self, req, options).await
    }
}
